\subsection{Degree 1}
Recall that \( H^0(G, M) \), the group \( M^G \) of invariants of \( M \) under \( G \).
A derivation is a 1-cocycle, or equivalently a map \( \varphi : G \to M \) such that \( \varphi(g_1 g_2) = g_1 \varphi(g_2) + \varphi(g_1) \), and an inner derivation is a map of the form \( \varphi(g) = gm - m \).
We present two interpretations of (inner) derivations.

\emph{First interpretation.}
Consider possible \( \mathbb Z G \)-actions on the abelian group \( M \oplus \mathbb Z \) of the form \( g(m, n) = (gm + n \varphi(g), n) \).
Then
\[ g_1(g_2(m, n)) = g_1(g_2 m + n \varphi(g_2), n) = (g_1 g_2 m + n g_1 \varphi(g_2) + n \varphi(g_1), n) \]
and
\[ (g_1 g_2)(m, n) = (g_1 g_2 m + n \varphi(g_1 g_2), n) \]
For these to coincide, we must require \( \varphi(g_1 g_2) = g_1 \varphi(g_2) + \varphi(g_1) \), which is to say that \( \varphi \) is a derivation.
In particular, if \( M \) is a free \( \mathbb Z \)-module of finite rank, then we obtain a map
\[ g \mapsto \begin{pmatrix}
    \theta_1(g) & \varphi(g) \\
    0 & 1
\end{pmatrix} \]
where \( \theta_1(g) \) is a matrix corresponding to the action of \( g \) on \( M \).
This is a group homomorphism only if \( \varphi \) is a derivation.
One can check that \( \varphi \) is an inner derivation if \( (-m, 1) \) generates a \( \mathbb Z G \)-submodule of \( M \) which is the trivial module.

\emph{Second interpretation.}
We first make the following definition.
\begin{definition}
    Let \( G \) be a group and \( M \) be a left \( \mathbb Z G \)-module.
    We construct the \emph{semidirect product} \( M \rtimes G \) by defining a group operation on the set \( M \times G \) as follows.
    \[ (m_1, g_1) \ast (m_2, g_2) = (m_1 + g_1 m_2, g_1 g_2) \]
\end{definition}
Then \( M \cong \qty{(m, 1) \mid m \in M} \) is a normal subgroup of \( M \rtimes G \).
Also, \( G \cong \qty{(0, g) \mid g \in G} \), and conjugation by \( \qty{(0, g) \mid g \in G} \) corresponds to the \( G \)-action on the module \( M \).
Further,
\[ \faktor{M \rtimes G}{\qty{(m, 1) \mid m \in M}} \cong G \]
There is a group homomorphism \( s : G \to M \rtimes G \) given by \( g \mapsto (0, g) \), such that \( \pi_2 \circ s = \id \) where \( \pi_2 \) is the second projection.
Such a map \( s \) is called a \emph{splitting}.
Given another splitting \( s_1 : G \to M \rtimes G \) such that \( \pi_2 \circ s_1 = \id \), we define \( \psi_{s_1} : G \to M \) by
\[ s_1(g) = (\psi_{s_1}(g), g) \in M \rtimes G \]
Then \( \psi_{s_1} \) is a 1-cocycle.
Given two splittings \( s_1, s_2 \), the difference \( \psi_{s_1} - \psi_{s_2} \) is a coboundary precisely when there exists \( m \) such that \( (m, 1)s_1(g)(m,1)^{-1} = s_2(g) \).
Conversely, given a 1-cocycle \( \varphi \in Z^1(G, M) \), there is a splitting \( s_1 : G \to M \rtimes G \) such that \( \varphi = \psi_{s_1} \).
\begin{theorem}
    \( H^1(G, M) \) bijects with the \( M \)-conjugacy classes of splittings.
\end{theorem}

\subsection{Degree 2}
\begin{definition}
    Let \( G \) be a group and \( M \) be a \( \mathbb Z G \)-module.
    An \emph{extension} of \( G \) by \( M \) is a group \( E \) with an exact sequence of group homomorphisms
    % https://q.uiver.app/#q=WzAsNSxbMCwwLCIwIl0sWzEsMCwiTSJdLFsyLDAsIkUiXSxbMywwLCJHIl0sWzQsMCwiMSJdLFswLDFdLFsxLDJdLFsyLDNdLFszLDRdXQ==
\[\begin{tikzcd}
	0 & M & E & G & 1
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
    \( M \) embeds into \( E \), so its image (also called \( M \)) is an abelian normal subgroup of \( E \).
    This is acted on by conjugation by \( E \), and so we obtain an induced action of \( \faktor{E}{M} \cong G \), which must match the given \( G \)-action on \( M \).
\end{definition}
\begin{example}
    The semidirect product \( M \rtimes G \) is an extension of \( G \) by \( M \).
    % https://q.uiver.app/#q=WzAsNSxbMCwwLCIwIl0sWzEsMCwiTSJdLFsyLDAsIk0gXFxydGltZXMgRyJdLFszLDAsIkciXSxbNCwwLCIxIl0sWzAsMV0sWzEsMl0sWzIsM10sWzMsNF1d
\[\begin{tikzcd}
	0 & M & {M \rtimes G} & G & 1
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
    In this case, the extension is called a \emph{split extension}, since there is a splitting.
\end{example}
\begin{definition}
    Two extensions are \emph{equivalent} if there is a commutative diagram of homomorphisms
% https://q.uiver.app/#q=WzAsNixbMCwxLCIwIl0sWzEsMSwiTSJdLFsyLDAsIkUiXSxbMywxLCJHIl0sWzQsMSwiMSJdLFsyLDIsIkUnIl0sWzAsMV0sWzEsMl0sWzIsM10sWzMsNF0sWzIsNSwiIiwxLHsic3R5bGUiOnsiYm9keSI6eyJuYW1lIjoiZGFzaGVkIn19fV0sWzUsM10sWzEsNV1d
\[\begin{tikzcd}
	&& E \\
	0 & M && G & 1 \\
	&& {E'}
	\arrow[from=2-1, to=2-2]
	\arrow[from=2-2, to=1-3]
	\arrow[from=1-3, to=2-4]
	\arrow[from=2-4, to=2-5]
	\arrow[dashed, from=1-3, to=3-3]
	\arrow[from=3-3, to=2-4]
	\arrow[from=2-2, to=3-3]
\end{tikzcd}\]
\end{definition}
If \( E, E' \) are equivalent extensions, then \( E \) and \( E' \) are isomorphic as groups.
The converse is false.
\begin{definition}
    A \emph{central} extension is an extension where the given \( \mathbb Z G \)-module is a trivial module (that is, it has trivial \( G \)-action).
\end{definition}
\begin{proposition}
    Let \( E \) be an extension of \( G \) by \( M \).
    If there is a splitting homomorphism \( s_1 : G \to E \), then the extension is equivalent to
    \[\begin{tikzcd}
        0 & M & {M \rtimes G} & G & 1
        \arrow[from=1-1, to=1-2]
        \arrow[from=1-2, to=1-3]
        \arrow[from=1-3, to=1-4]
        \arrow[from=1-4, to=1-5]
    \end{tikzcd}\]
    and thus \( E \cong M \rtimes G \).
\end{proposition}
\begin{theorem}
    Let \( G \) be a group and let \( M \) be a \( \mathbb Z G \)-module.
    Then there is a bijection from \( H^2(G, M) \) to the set of equivalence classes of extensions of \( G \) by \( M \).
\end{theorem}
\begin{proof}
    Given an extension
    % https://q.uiver.app/#q=WzAsNSxbMCwwLCIwIl0sWzEsMCwiTSJdLFsyLDAsIkUiXSxbMywwLCJHIl0sWzQsMCwiMSJdLFswLDFdLFsxLDJdLFsyLDNdLFszLDRdXQ==
\[\begin{tikzcd}
	0 & M & E & G & 1
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
    there is a set-theoretic section \( s : G \to E \) such that
    % https://q.uiver.app/#q=WzAsMyxbMCwwLCJHIl0sWzEsMCwiRSJdLFsxLDEsIkciXSxbMCwxLCJzIl0sWzEsMiwiXFxwaSJdLFswLDIsIlxcaWQiLDJdXQ==
\[\begin{tikzcd}
	G & E \\
	& G
	\arrow["s", from=1-1, to=1-2]
	\arrow["\pi", from=1-2, to=2-2]
	\arrow["\id"', from=1-1, to=2-2]
\end{tikzcd}\]
    commutes.
    Note that \( s \) need not be a group homomorphism.
    Without loss of generality, we can suppose \( s(1) = 1 \).
    We define a map
    \[ \varphi(g_1, g_2) = s(g_1)s(g_2)s(g_1 g_2)^{-1} \]
    which measures the failure of \( s \) to be a group homomorphism.
    Then \( \pi(\varphi(g_1, g_2)) = 1 \), and so \( \varphi(g_1, g_2) \in M \).
    Thus \( \varphi : G^2 \to M \) is a 2-cochain, and we can show it is a 2-cocycle.
    We have
    \begin{align*}
        s(g_1) s(g_2) s(g_3) &= \varphi(g_1, g_2) s(g_1 g_2) s(g_3) \\
        &= \varphi(g_1, g_2) \varphi(g_1 g_2, g_3) s(g_1 g_2 g_3)
    \end{align*}
    and similarly,
    \begin{align*}
        s(g_1) s(g_2) s(g_3) &= s(g_1) \varphi(g_2, g_3) s(g_2 g_3) \\
        &= s(g_1) \varphi(g_2, g_3) s(g_1)^{-1} s(g_1) s(g_2 g_3) \\
        &= s(g_1) \varphi(g_2, g_3) s(g_1)^{-1} \varphi(g_1, g_2 g_3) s(g_1 g_2 g_3)
    \end{align*}
    We therefore obtain
    \begin{align*}
        \varphi(g_1, g_2) \varphi(g_1 g_2, g_3) s(g_1 g_2 g_3) &= s(g_1) \varphi(g_2, g_3) s(g_1)^{-1} \varphi(g_1, g_2 g_3) s(g_1 g_2 g_3) \\
        \varphi(g_1, g_2) \varphi(g_1 g_2, g_3) &= s(g_1) \varphi(g_2, g_3) s(g_1)^{-1} \varphi(g_1, g_2 g_3)
    \end{align*}
    Converting into additive notation,
    \[ \varphi(g_1, g_2) + \varphi(g_1 g_2, g_3) = g_1 \varphi(g_2, g_3) + \varphi(g_1, g_2 g_3) \]
    and so
    \[ (d^3 \varphi)(g_1, g_2, g_3) = 0 \]
    Hence \( \varphi \) is a 2-cocycle as claimed.
    Note that \( \varphi \) is a \emph{normalised} cocycle: it satisfies \( \varphi(1, g) = \varphi(g, 1) = 0 \).
    We have therefore proven that an extension of \( G \) by \( M \), with a choice of set-theoretic section \( s : G \to E \), yields a normalised 2-cocycle \( \varphi \in Z^2(G, M) \).

    Now take another choice of section \( s' \) with \( s'(1) = 1 \).
    We show that the normalised cocycles \( \varphi, \varphi' \) differ by a coboundary, and so we have a map defined from equivalence classes of extensions to \( H^2(G, M) \).
    We have \( \pi(s(g) s'(g)^{-1}) = 1 \), so \( s(g) s'(g)^{-1} \in \ker \pi = M \).
    Let \( \psi(g) \) denote \( s(g) s'(g)^{-1} \).
    Thus \( \psi : G \to M \).
    We have
    \begin{align*}
        s'(g_1) s'(g_2) &= \psi(g_1) s(g_1) \psi(g_2) s(g_2) \\
        &= \psi(g_1) s(g_1) \psi(g_2) s(g_1)^{-1} s(g_1) s(g_2) \\
        &= \psi(g_1) s(g_1) \psi(g_2) s(g_1)^{-1} \varphi(g_1, g_2) s(g_2) \\
        &= \psi(g_1) s(g_1) \psi(g_2) s(g_1)^{-1} \varphi(g_1, g_2) \psi(g_1 g_2)^{-1} s'(g_1 g_2) \\
    \end{align*}
    Switching to additive notation,
    \begin{align*}
        \varphi'(g_1, g_2) &= \psi(g_1) + g_1 \psi(g_2) + \varphi(g_1, g_2) - \psi(g_1 g_2) \\
        &= \varphi(g_1, g_2) + (d^2 \psi)(g_1, g_2)
    \end{align*}
    Thus \( \varphi \) and \( \varphi' \) differ by a coboundary, and so we have a well-defined map from extensions of \( G \) by \( M \) to \( H^2(G, M) \).

    To complete the proof, we must check that equivalent extensions give rise to the same cohomology class, and that there is an inverse map from cohomology classes to equivalence classes of extensions.
    To produce the inverse, we use the following lemma.
    \begin{lemma}
        Let \( \varphi \in Z^2(G, M) \).
        Then there is a cochain \( \psi \in C^1(G, M) \) such that \( \varphi + d^2 \psi \) is a normalised cocycle.
        Hence, every cohomology class can be represented by a normalised cocycle.
    \end{lemma}
    \begin{proof}
        Let \( \psi(g) = -\varphi(1, g) \).
        Then
        \begin{align*}
            (\varphi + d^2 \psi)(1, g) &= \varphi(1, g) - (\varphi(1, g) - \varphi(1, g) + \varphi(1, 1)) \\
            &= \varphi(1, g) - \varphi(1, 1)
        \end{align*}
        Similarly, we obtain
        \[ (\varphi + d^2 \psi)(g, 1) = \varphi(g, 1) - g\varphi(1, 1) \]
        But we know that
        \[ d^3\varphi(1, 1, g) = 0 = d^3\varphi(g, 1, 1) \]
        since \( \varphi \) is a cocycle.
        Hence, one can check computationally that both equations above are zero.
    \end{proof}
    We now take a normalised cocycle \( \varphi \) representing a given cohomology class.
    We construct an extension
    % https://q.uiver.app/#q=WzAsNSxbMCwwLCIwIl0sWzEsMCwiTSJdLFsyLDAsIkVfXFx2YXJwaGkiXSxbMywwLCJHIl0sWzQsMCwiMSJdLFswLDFdLFsxLDJdLFsyLDNdLFszLDRdXQ==
\[\begin{tikzcd}
	0 & M & {E_\varphi} & G & 1
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
    by
    \[ (m_1, g_1) \ast (m_2, g_2) = (m_1 + g_1 m_2 + \varphi(g_1, g_2), g_1, g_2) \]
    For this to be a group operation, we use the fact that \( \varphi \) is normalised.
    This yields an extension
    % https://q.uiver.app/#q=WzAsNSxbMCwwLCIwIl0sWzEsMCwiTSJdLFsyLDAsIkVfXFx2YXJwaGkiXSxbMywwLCJHIl0sWzQsMCwiMSJdLFswLDFdLFsxLDJdLFsyLDMsIlxccGkiXSxbMyw0XV0=
\[\begin{tikzcd}
	0 & M & {E_\varphi} & G & 1
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow["\pi", from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
    where \( \pi \) is the projection onto the second component.
    Note that if \( \varphi' \) is another normalised 2-cocycle representing the given cohomology class, then \( \varphi - \varphi' \) is a coboundary, so we can define a map \( E_\varphi \to E_{\varphi'} \) by
    \[ (m, g) \mapsto (m + \psi(g), g) \]
    One can check that this induces an equivalence of extensions.
    These constructions are inverses.
\end{proof}

\subsection{Central extensions}
\begin{example}
    Consider central extensions of \( \mathbb Z^2 \) by \( \mathbb Z \).
    We already know of two such extensions.
    The first is
    % https://q.uiver.app/#q=WzAsOSxbMCwwLCIwIl0sWzEsMCwiXFxtYXRoYmIgWiJdLFsyLDAsIlxcbWF0aGJiIFpeMyJdLFszLDAsIlxcbWF0aGJiIFpeMiJdLFs0LDAsIjAiXSxbMSwxLCJtIl0sWzIsMSwiKG0sIDAsIDApIl0sWzIsMiwiKG0sIHIsIHMpIl0sWzMsMiwiKHIsIHMpIl0sWzAsMV0sWzEsMl0sWzIsM10sWzMsNF0sWzUsNiwiIiwwLHsic3R5bGUiOnsidGFpbCI6eyJuYW1lIjoibWFwcyB0byJ9fX1dLFs3LDgsIiIsMCx7InN0eWxlIjp7InRhaWwiOnsibmFtZSI6Im1hcHMgdG8ifX19XV0=
\[\begin{tikzcd}
	0 & {\mathbb Z} & {\mathbb Z^3} & {\mathbb Z^2} & 0 \\
	& m & {(m, 0, 0)} \\
	&& {(m, r, s)} & {(r, s)}
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
	\arrow[maps to, from=2-2, to=2-3]
	\arrow[maps to, from=3-3, to=3-4]
\end{tikzcd}\]
    Let \( H \) denote the \emph{Heisenberg group}
    \[ H = \qty{\begin{pmatrix}
        1 & r & m \\
        0 & 1 & s \\
        0 & 0 & 1
    \end{pmatrix} \midd r, s, m \in mathbb Z} \]
    Then we have the extension
    % https://q.uiver.app/#q=WzAsOSxbMCwwLCIwIl0sWzEsMCwiXFxtYXRoYmIgWiJdLFsyLDAsIkgiXSxbMywwLCJcXG1hdGhiYiBaXjIiXSxbNCwwLCIwIl0sWzEsMSwibSJdLFsyLDEsIlxcYmVnaW57cG1hdHJpeH0xJjAmbVxcXFwwJjEmMFxcXFwwJjAmMVxcZW5ke3BtYXRyaXh9Il0sWzIsMiwiXFxiZWdpbntwbWF0cml4fTEmciZtXFxcXDAmMSZzXFxcXDAmMCYxXFxlbmR7cG1hdHJpeH0iXSxbMywyLCIociwgcykiXSxbMCwxXSxbMSwyXSxbMiwzXSxbMyw0XSxbNSw2LCIiLDAseyJzdHlsZSI6eyJ0YWlsIjp7Im5hbWUiOiJtYXBzIHRvIn19fV0sWzcsOCwiIiwwLHsic3R5bGUiOnsidGFpbCI6eyJuYW1lIjoibWFwcyB0byJ9fX1dXQ==
\[\begin{tikzcd}[ampersand replacement=\&]
	0 \& {\mathbb Z} \& H \& {\mathbb Z^2} \& 0 \\
	\& m \& {\begin{pmatrix}1&0&m\\0&1&0\\0&0&1\end{pmatrix}} \\
	\&\& {\begin{pmatrix}1&r&m\\0&1&s\\0&0&1\end{pmatrix}} \& {(r, s)}
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
	\arrow[maps to, from=2-2, to=2-3]
	\arrow[maps to, from=3-3, to=3-4]
\end{tikzcd}\]
    Writing multiplicatively, let \( T \cong \mathbb Z^2 \) be generated by \( a \) and \( b \).
    We have the following free resolution of the trivial \( \mathbb Z T \)-module \( \mathbb Z \).
    % https://q.uiver.app/#q=WzAsNixbMCwwLCIwIl0sWzEsMCwiXFxtYXRoYmIgWlQiXSxbMiwwLCJcXG1hdGhiYiBaVF4yIl0sWzMsMCwiXFxtYXRoYmIgWlQiXSxbNCwwLCJcXG1hdGhiYiBaIl0sWzUsMCwiMCJdLFswLDFdLFsxLDIsIlxcYmV0YSJdLFsyLDMsIlxcYWxwaGEiXSxbMyw0LCJcXHZhcmVwc2lsb24iXSxbNCw1XV0=
\[\begin{tikzcd}[ampersand replacement=\&]
	0 \& {\mathbb ZT} \& {\mathbb ZT^2} \& {\mathbb ZT} \& {\mathbb Z} \& 0
	\arrow[from=1-1, to=1-2]
	\arrow["\beta", from=1-2, to=1-3]
	\arrow["\alpha", from=1-3, to=1-4]
	\arrow["\varepsilon", from=1-4, to=1-5]
	\arrow[from=1-5, to=1-6]
\end{tikzcd}\]
    where
    \begin{align*}
        \beta(z) &= (z(1-b), z(a-1)) \\
        \alpha(x,y) &= x(a-1) + y(b-1)
    \end{align*}
    and \( \varepsilon \) is the augmentation map.
    Apply \( \Hom_T(-, \mathbb Z) \) to obtain the chain complex
    % https://q.uiver.app/#q=WzAsNCxbMCwwLCIwIl0sWzEsMCwiXFxIb21fVChcXG1hdGhiYiBaVCwgXFxtYXRoYmIgWikiXSxbMiwwLCJcXEhvbV9UKFxcbWF0aGJiIFpUXjIsXFxtYXRoYmIgWikiXSxbMywwLCJcXEhvbV9UKFxcbWF0aGJiIFpULFxcbWF0aGJiIFopIl0sWzEsMF0sWzIsMSwiXFxiZXRhXlxcc3RhciIsMl0sWzMsMiwiXFxhbHBoYV5cXHN0YXIiLDJdXQ==
\[\begin{tikzcd}[ampersand replacement=\&]
	0 \& {\Hom_T(\mathbb ZT, \mathbb Z)} \& {\Hom_T(\mathbb ZT^2,\mathbb Z)} \& {\Hom_T(\mathbb ZT,\mathbb Z)}
	\arrow[from=1-2, to=1-1]
	\arrow["{\beta^\star}"', from=1-3, to=1-2]
	\arrow["{\alpha^\star}"', from=1-4, to=1-3]
\end{tikzcd}\]
    We claim that \( \alpha^\star \) and \( \beta^\star \) are both zero maps, and so
    \[ H^2(T, \mathbb Z) = \Hom_T(\mathbb Z T, \mathbb Z) \cong \mathbb Z \]
    and the generator is represented by the augmentation map \( \varepsilon : \mathbb Z T \to \mathbb Z \).

    Take a \( \mathbb Z T \)-map \( f : \mathbb Z T^2 \to \mathbb Z \).
    Then
    \begin{align*}
        (\beta^\star f)(z) &= f(\beta)(z) \\
        &= f(z(1-b), z(a-1)) \\
        &= f(z - zb, 0) + f(0, za - z) \\
        &= (1 - b)f(z, 0) + (a - 1)f(0, z) \\
        &= 0
    \end{align*}
    where the last line holds as \( T \) acts trivially.
    Similarly, \( \alpha^\star = 0 \).

    Next, we interpret \( H^2(T, \mathbb Z) \) in terms of 2-cocycles arising from the bar resolution.
    We construct a chain map as follows.
\[\begin{tikzcd}[ampersand replacement=\&]
	{\mathbb ZT\qty{T^{(2)}}} \& {\mathbb ZT\qty{T^{(1)}}} \& {\mathbb ZT\qty{T^{(0)}}} \& {\mathbb Z} \& 0 \\
	{\mathbb Z T} \& {\mathbb Z T^2} \& {\mathbb Z T} \& {\mathbb Z} \& 0
	\arrow["{d_2}", from=1-1, to=1-2]
	\arrow["{d_1}", from=1-2, to=1-3]
	\arrow["\varepsilon", from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
	\arrow["\beta"', from=2-1, to=2-2]
	\arrow["\alpha"', from=2-2, to=2-3]
	\arrow[from=2-3, to=2-4]
	\arrow[from=2-4, to=2-5]
	\arrow[Rightarrow, no head, from=1-4, to=2-4]
	\arrow["{f_2}"', from=1-1, to=2-1]
	\arrow["{f_1}"', from=1-2, to=2-2]
	\arrow["\id"', from=1-3, to=2-3]
	\arrow[Rightarrow, no head, from=2-5, to=1-5]
\end{tikzcd}\]
    To construct \( f_1 \) such that \( \alpha f_1 = d_1 \), we need to give images of the symbols \( [a^r b^s] \) with \( r, s \in \mathbb Z \).
    We must have
    \[ [a^r b^s] \mapsto (x_{r,s}, y_{r,s}) \in \mathbb ZT^2 \]
    where
    \[ \alpha(x_{r,s}, y_{r,s}) = d_1([a^r b^s]) = a^r b^s - 1 = (a^r - 1)b^s + (b^s - 1) \]
    We define
    \[ S(a, r) = \begin{cases}
        1 + a + \dots + a^{r-1} \\ \text{if } r > 0 \\
        -a^{-1} - \dots - a^r \\ text{if } r \leq 0
    \end{cases} \]
    Note that
    \[ S(a, r)(a-1) = a^r - 1 \]
    for any \( r \in \mathbb Z \).
    Then
    \begin{align*}
        \alpha(S(a, r) b^s, S(b, s)) &= S(a, r) b^s(a-1) + S(b, s)(b-1) \\
        &= d_1([a^r b^s])
    \end{align*}
    as required.
    So we may define
    \[ f_1([a^r b^s]) = (S(a, r) b^s, S(b, s)) \]
    To define \( f_2 \), we need to give images of the symbols \( [a^r b^s | a^t b^u] \).
    For each such symbol, we find \( z_{r,s,t,u} \in \mathbb Z T \) such that
    \[ f_1 d_2([a^r b^s | a^t b^u]) = \beta(z_{r,s,t,u}) \]
    We can explicitly calculate
    \begin{align*}
        f_1 d_2([a^r b^s | a^t b^u]) &= f_1(a^r b^s [a^t b^u] - [a^{r+t} b^{s+u}] - [a^r b^s]) \\
        &= (a^r b^s S(a,t) b^u - S(a,r + t)b^{s+u} + S(a,r)b^s, a^r b^s S(b,u) - S(b, s+u) + S(b,s))
    \end{align*}
    So defining
    \[ z_{r,s,t,u} = S(a,r) b^s S(b,u) \]
    gives the required equation.
    \[ f_2([a^r b^s | a^t b^u]) = S(a,r) b^s S(b,u) \]
    Now we find a cochain \( \varphi : T^2 \to \mathbb Z \) representing the cohomology class \( p \in \mathbb Z = \Hom_T(\mathbb Z T, \mathbb Z) = H^2(T, \mathbb Z) \).
    Such a cochain is given by the composition
    % https://q.uiver.app/#q=WzAsMyxbMCwwLCJUXjIiXSxbMSwwLCJcXG1hdGhiYiBaVCJdLFsyLDAsIlxcbWF0aGJiIFoiXSxbMCwxLCJmXzIiXSxbMSwyLCJwXFx2YXJlcHNpbG9uIl1d
\[\begin{tikzcd}
	{T^2} & {\mathbb ZT} & {\mathbb Z}
	\arrow["{f_2}", from=1-1, to=1-2]
	\arrow["p\varepsilon", from=1-2, to=1-3]
\end{tikzcd}\]
    Since \( \varepsilon(S(a, r)) = r \), we find
    \[ \varphi(a^r b^s, a^t b^u) = p\varepsilon(z_{r,s,t,u}) = pru \]
    The group structure on \( \mathbb Z \times T \) corresponding to this is
    \[ (m, a^r b^s) \ast (n, a^t b^u) = (m + n + pru, a^{r+t} b^{s+u}) \]
    This corresponds to the group of matrices
    \[ \qty{\begin{pmatrix}
        1 & pr & m \\
        0 & 1 & s \\
        0 & 0 & 1
    \end{pmatrix} \midd r, s, m \in \mathbb Z} \]
\end{example}

\subsection{Generators and relations}
Another approach to considering extensions, and in particular central extensions, is the use of partial resolutions arising from generators and relations.
Given a group \( G \), for any generating set \( X \) there is a canonical map \( F \to G \) where \( F \) is the free group on \( X \).
Let \( R \) be the kernel of this map, and so we have a short exact sequence
% https://q.uiver.app/#q=WzAsNSxbMCwwLCIxIl0sWzEsMCwiUiJdLFsyLDAsIkYiXSxbMywwLCJHIl0sWzQsMCwiMSJdLFswLDFdLFsxLDJdLFsyLDNdLFszLDRdXQ==
\[\begin{tikzcd}
	1 & R & F & G & 1
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
This is a presentation for \( G \), where the subgroup \( R \) can be thought of as the set of relations.
Since it is a normal subgroup, \( F \) acts on it by conjugation.
Often we take a set of generators of \( R \) as a normal subgroup of \( F \).

Let \( R_{\mathrm{ab}} = \faktor{R}{R'} \) be the largest abelian quotient of \( R \).
We say that \( R' \) is the \emph{derived subgroup} of \( R \), and is given by the commutator subgroup \( [R,R] \) of \( F \).
It inherits an action of \( F \), but \( R \) acts trivially, so we have an induced action by \( G = \faktor{F}{R} \).
Clearly \( R_{\mathrm{ab}} \) is a \( \mathbb Z \)-module, and it is a \( \mathbb Z G \)-module.
This is called the \emph{relation module}.
We have an extension
% https://q.uiver.app/#q=WzAsNSxbMCwwLCIxIl0sWzEsMCwiUl97XFxtYXRocm17YWJ9fSJdLFsyLDAsIlxcZmFrdG9ye0Z9e1InfSJdLFszLDAsIkciXSxbNCwwLCIxIl0sWzAsMV0sWzEsMl0sWzIsM10sWzMsNF1d
\[\begin{tikzcd}
	1 & {R_{\mathrm{ab}}} & {\faktor{F}{R'}} & G & 1
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
To get a central extension, we instead consider
% https://q.uiver.app/#q=WzAsNSxbMCwwLCIxIl0sWzEsMCwiXFxmYWt0b3J7Un17W1IsRl19Il0sWzIsMCwiXFxmYWt0b3J7Rn17W1IsRl19Il0sWzMsMCwiRyJdLFs0LDAsIjEiXSxbMCwxXSxbMSwyXSxbMiwzXSxbMyw0XV0=
\[\begin{tikzcd}
	1 & {\faktor{R}{[R,F]}} & {\faktor{F}{[R,F]}} & G & 1
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
where \( [R,F] \) is the commutator subgroup.
There is not a largest or universal central extension, since we can always form the direct product with an abelian group, but this particular central extension above does have some good properties that we will now explore.
\begin{theorem}
    Let
    % https://q.uiver.app/#q=WzAsNSxbMCwwLCIxIl0sWzEsMCwiUiJdLFsyLDAsIkYiXSxbMywwLCJHIl0sWzQsMCwiMSJdLFswLDFdLFsxLDJdLFsyLDNdLFszLDRdXQ==
\[\begin{tikzcd}
	1 & R & F & G & 1
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
    be a presentation of \( G \).
    Let \( M \) be a left \( \mathbb Z G \)-module.
    Then there is an exact sequence
    % https://q.uiver.app/#q=WzAsNCxbMCwwLCJIXjEoRixNKSJdLFsxLDAsIlxcSG9tX0coUl97XFxtYXRocm17YWJ9fSxNKSJdLFsyLDAsIkheMihHLE0pIl0sWzMsMCwiMCJdLFswLDFdLFsxLDJdLFsyLDNdXQ==
\[\begin{tikzcd}
	{H^1(F,M)} & {\Hom_G(R_{\mathrm{ab}},M)} & {H^2(G,M)} & 0
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
\end{tikzcd}\]
    Thus, any equivalence class of extensions of \( G \) by \( M \) corresponding to a cohomology class in \( H^2(G,M) \) arises from a \( \mathbb Z G \)-map \( R_{\mathrm{ab}} \to M \).
\end{theorem}
Note that \( M \) is a \( \mathbb Z F \)-module via the map \( F \to G \).
\begin{corollary}
    In the above situation, if \( M \) is a trivial \( \mathbb Z G \)-module, then we have an exact sequence
    % https://q.uiver.app/#q=WzAsNCxbMCwwLCJcXEhvbShGLE0pIl0sWzEsMCwiXFxIb21fRyhcXGZha3RvcntSfXtbUixGXX0sTSkiXSxbMiwwLCJIXjIoRyxNKSJdLFszLDAsIjAiXSxbMCwxXSxbMSwyXSxbMiwzXV0=
\[\begin{tikzcd}
	{\Hom(F,M)} & {\Hom_G(\faktor{R}{[R,F]},M)} & {H^2(G,M)} & 0
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
\end{tikzcd}\]
\end{corollary}
\begin{proof}
    \( M \) is a trivial \( \mathbb Z F \)-module, so \( H^1(F, M) = \Hom(F, M) \), which is a set of group homomorphisms to an abelian group, and any such morphism factors uniquely through the abelianisation so this is equal to \( \Hom(F_{\mathrm{ab}}, M) \).
    Similarly, \( \Hom_G(R_{\mathrm{ab}}, M) = \Hom_G\qty(\faktor{R}{[R,F]}, M) \).
\end{proof}

\subsection{Homology groups}
There is also a connection with homology groups.
Given a projective resolution of the trivial \( \mathbb Z G \)-module \( \mathbb Z \), we can apply the map \( \mathbb Z \otimes_{\mathbb Z G} - \) and obtain homology groups.
The homology groups do not depend on the choice of resolution, and are written \( H_n(G, \mathbb Z) \).
\begin{definition}
    The \emph{Schur multiplier} \( M(G) \) of a group \( G \) is the second homology group \( H_2(G, \mathbb Z) \).
\end{definition}
\begin{theorem}[universal coefficients theorem]
    Let \( G \) be a group and \( M \) be a trivial \( \mathbb Z G \)-module.
    Then there is a short exact sequence
    % https://q.uiver.app/#q=WzAsNSxbMCwwLCIwIl0sWzEsMCwiXFxvcGVyYXRvcm5hbWV7RXh0fV4xKEdfe1xcbWF0aHJte2FifX0sTSkiXSxbMiwwLCJIXjIoRyxNKSJdLFszLDAsIlxcSG9tKE0oRyksTSkiXSxbNCwwLCIwIl0sWzAsMV0sWzEsMl0sWzIsM10sWzMsNF1d
\[\begin{tikzcd}
	0 & {\operatorname{Ext}^1(G_{\mathrm{ab}},M)} & {H^2(G,M)} & {\Hom(M(G),M)} & 0
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
    where \( \operatorname{Ext}^1(G_{\mathrm{ab}}, M) \) arises from applying \( \Hom_{\mathbb Z}(-, M) \) to a projective resolution of the abelian group \( G_{\mathrm{ab}} \).
\end{theorem}
\begin{corollary}
    Suppose that \( G = G' \), and so \( G_{\mathrm{ab}} = 1 \).
    Then \( H^2(G, M) \cong \Hom(M(G), M) \).
\end{corollary}
In some texts, the Schur multiplier is defined to be \( H^2(G, \mathbb C^\times) \), where \( \mathbb C^\times \) is the a trivial module written multiplicatively.
This approach can be useful when considering projective representations \( G \to PGL(\mathbb C) \).
Such a map lifts to give a linear representation of central extension of \( G \).
\begin{theorem}[Hopf's formula]
    Given a presentation
    % https://q.uiver.app/#q=WzAsNSxbMCwwLCIxIl0sWzEsMCwiUiJdLFsyLDAsIkYiXSxbMywwLCJHIl0sWzQsMCwiMSJdLFswLDFdLFsxLDJdLFsyLDNdLFszLDRdXQ==
\[\begin{tikzcd}
	1 & R & F & G & 1
	\arrow[from=1-1, to=1-2]
	\arrow[from=1-2, to=1-3]
	\arrow[from=1-3, to=1-4]
	\arrow[from=1-4, to=1-5]
\end{tikzcd}\]
    we have
    \[ M(G) \cong \faktor{F' \cap R}{[R,F]} \]
\end{theorem}
Note that this is not necessarily all of \( \faktor{F}{[R,F]} \), and this shows that \( \faktor{F' \cap R}{[R,F]} \) is independent of the choice of presentation.
